package com.ludaxun.mapapi.controller;


import com.ludaxun.mapapi.entity.MapTrack;
import com.ludaxun.mapapi.jpa.MapTrackJpa;
import com.ludaxun.mapapi.utils.R;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/mapTrack")
public class MapTrackController {


    @Resource
    MapTrackJpa mapTrackJpa;

    @GetMapping("getAll")
    @Transactional()
    public R getAll(){

        List<MapTrack> re=mapTrackJpa.findAll();


        return R.ok(re);
    }



}
